<?php
namespace App\Http\Controllers;

use App\Models\Main\ApiAccessModel;

class ApiAccessController extends BaseController
{
    /**
     * 接口权限值获取
     */

    protected $access;

    public function __construct(ApiAccessModel $apiAccessModel)
    {
        $this->access = $apiAccessModel;
    }

    /**
     * APP接口权限值
     */
    public function getAppApiAccess()
    {
        $dataArr = array(
            'app_access' => $this->getApiAccess(1),
        );
        return array(
            'code' => '0',
            'msg' => '获取成功',
            'data' => $dataArr,
        );
    }

    /**
     * PC接口权限值
     */
    public function getWebApiAccess()
    {
        $dataArr = array(
            'wa' => $this->getApiAccess(2),
        );
        return array(
            'code' => '0',
            'msg' => '获取成功',
            'data' => $dataArr,
        );
    }
}
